<?php

/*
Setup Search For Pets (admin_set_searchpets.php)
*/

$page_title = "Setup Search For Pets";
$rank_check = 7;
include "../header.inc.php";

$game=$_GET['game'];

print "$openHTML";

$findSearchForPetRow = fetch("SELECT * FROM search_pets_arrays WHERE game = '$game'");
if (!$findSearchForPetRow[id])
{
	mysql_query("INSERT INTO search_pets_arrays (game) VALUES ('$game')");
	$findSearchForPetRow = fetch("SELECT * FROM search_pets_arrays WHERE game = '$game'");
}

ECHO <<<END

<p align=center><font size=+2><a href=setup_searchpets.php?game=$game>Read this before setting up the game!</a></font></p>

<P><FORM ACTION="admin_set_searchpets.pro.php?game=$game" METHOD=POST>
   <CENTER><TABLE BGCOLOR="$tableOutline" CELLSPACING=1 CELLPADDING=0 WIDTH=450>
      <TR BGCOLOR="$topAndBottomBG">
         <TD COLSPAN=2 HEIGHT=50>
            <CENTER><FONT SIZE="+2" COLOR="$topAndBottomText">--Setup Search Game--</FONT></CENTER>
         </TD>
      </TR>
      <TR BGCOLOR="$maincellColor">
         <TD WIDTH=80 HEIGHT=40>
            <P>Pets:<br><A HREF="javascript:;" onclick="window.open('$baseurl/listpets.php?game=$game','listpets',config='height=425,width=300,menubar=no,resizable=yes,directories=no,scrollbars=yes,status=yes,toolbar=no'); return false;">List Pets</A>
</P>
         </TD>
         <TD HEIGHT=40>
            <P><FONT SIZE="-1">&nbsp;<TEXTAREA NAME="search_pets" ROWS=7 COLS=65 WRAP=virtual>$findSearchForPetRow[pets]</TEXTAREA></FONT></P>
         </TD>
      </TR>
      <TR BGCOLOR="$middleBG">
         <TD WIDTH=80 HEIGHT=40>
            <P>Items:<br></P>
         </TD>
         <TD HEIGHT=40>
            <P><FONT SIZE="-1">&nbsp;<TEXTAREA NAME="search_items" ROWS=7 COLS=65 WRAP=virtual>$findSearchForPetRow[items]</TEXTAREA></FONT></P>
         </TD>
      </TR>
      <TR>
         <TD COLSPAN=2 HEIGHT=30 BGCOLOR="$topAndBottomBG">
            <CENTER><FONT SIZE="-1" COLOR="$topAndBottomText"><I><INPUT TYPE=submit NAME=Submit VALUE="Setup Game!!"></I></FONT></CENTER>
         </TD>
      </TR>
   </TABLE>
   </CENTER>
</FORM></P>
END;

print "$closeHTML";
?>
